package com.example.demo.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.demo.domain.Commodity;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.demo.exception.CommodityException;

import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author ${author}
 * @since 2022-10-30
 */
public interface ICommodityService extends IService<Commodity> {
    IPage<Commodity> findCommodity(Map<String, Object> condition, Integer pageNum, Integer pageSize);

    Commodity addCommodity(Commodity commodity) throws CommodityException;

    void updateCommodity(long id, Commodity commodity) throws CommodityException;

    //delete和get方法可以直接用IService<T> 中的。

}
